@extends('admin.main.layout')
@section('title', '添加管理员')
@section('content')
<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-body">
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th>订单ID</th>
                            <th>名称</th>
                            <th>金额</th>
                            <th>状态</th>
                            <th>到期时间</th>
                            <th>创建时间</th>
                        </tr>
                    </thead>
                    <tbody>
                        @forelse($memberOrders as $memberOrder)
                        <tr>
                            <td>{{ $memberOrder->order_no }}</td>
                            <td>{{ $memberOrder->name }}</td>
                            <td>¥{{ $memberOrder->price }}</td>
                            @if($memberOrder->pay_status == 3)
                            <td class="text-success">已支付</td>
                            @else
                            <td>未支付</td>
                            @endif
                            <td>{{ $memberOrder->end_time < 1 ? "-" : date("Y-m-d H:i:s",$memberOrder->end_time) }}</td>
                            <td>{{ $memberOrder->created_at }}</td>
                        </tr>
                        @empty
                        <tr>
                            <td colspan="6">当前暂无订单</td>
                        </tr>
                        @endforelse
                    </tbody>
                </table>
                <div class="">
                    <ul class="pagination">
                        {!! $memberOrders->render() !!}
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
